/*
 * Tester.h
 *
 *  Created on: Apr 4, 2012
 *      Author: ajeffery
 */

#ifndef TESTER_H_
#define TESTER_H_

#define BUF_SIZE 256

typedef struct test_lists{
	int (*test_fd)();
	char name[BUF_SIZE];
	char func[BUF_SIZE];
	void *next;
}test_list_t;

class Tester {
public:
	Tester();
	virtual ~Tester();

	void register_test(int (*fd)(), char* class_name, char* functionality);
	void run_tests();

private:
	void print_results(int result, char* class_name, char* functionality);

	int total_tests;
	int tests_passed;
	int tests_failed;

	test_list_t *tests;
};

#endif /* TESTER_H_ */
